<!DOCTYPE html>
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">

    </style>
</head>
<body>
<div id="b">
    <!-- post-banner start -->
    <div class="blog-details-area pd-top-50 pd-bottom-80">
        <div class="container">
            <div class="row">
                <div class="col-lg-10">
                    <div class="blog-details-wrap">
                        <div class="blogcontent">
                            <h4 th:text="${blog.title}" style="text-align: center"></h4>
                            <p style="color: gray;text-align: center;margin-top: 16px"><span
                                    th:text="' 发布日期: '+${#dates.format(blog.releaseDate,'yyyy-MM-dd HH:mm:ss')}+' '"></span>&nbsp;&nbsp;
                                <span th:text="' 阅读次数: '+${blog.click}+' '"></span> &nbsp; &nbsp;  点赞数: <span
                                        th:text="${blog.likeNum}"></span> &nbsp; &nbsp;  所属类别:
                                <a th:href="${'/index?blogTypeId='+blog.blogType.id}" style="color: grey"><span th:text="${blog.blogType.name}"></span></a>
                                <a id="like2" href="#" hidden="hidden"><i class="fa fa-thumbs-up mytooltip" title="你已经点赞过这篇博客" style="float: right;font-size: 20px"></i></a>
                                <a id="like1" href="javascript:like()" th:if="${blog.isLike==null}"><i class="fa fa-thumbs-o-up mytooltip" title="点赞这篇博客" style="float: right;font-size: 20px;color: red"></i></a>
                                <a href="#" th:if="${blog.isLike==1}"><i class="fa fa-thumbs-up mytooltip" title="你已经点赞过这篇博客" style="float: right;font-size: 20px"></i></a>
                            </p>
                            <p th:utext="${blog.content}"></p>
                            <p style="text-align: right;color: grey" th:if="${blogLastClickTime!=null}">
                                本文上一次被查看时间&nbsp;:&nbsp;<span
                                    th:text="${#dates.format(blogLastClickTime,'yyyy-MM-dd HH:mm:ss')}"></span></p>
                            <p style="text-align: center"><img th:src="@{/static/images/end.png}" id="img3" style="height: 55px"
                                                               alt=""></p>
                            <hr>
                            <span th:utext="${previousAndNextBlogCode}"></span>
                            <p style="color: white">1</p>
                        </div>
                        <!-- contact area Start -->
                        <div class="contact-area pd-top-50 pd-bottom-80">
                            <div class="container">
                                <div class="row">
                                    <div class="col-12">
                                        <div class="contact-area-wrap">
                                            <div class="comment-area">
                                                <form>
                                                    <h5>发表评论</h5>
                                                    <div class="row">
                                                        <div class="col-12">
                                                            <div class="single-input-wrap single-textarea-wrap">
                                                                <input type="text" id="commentBlogId" hidden="hidden" th:value="${blog.id}">
                                                                <textarea rows="6" id="commentContent" name="content" required="required" placeholder="请输入评论内容..."></textarea>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <a href="javascript:submitComment()"><button type="button" class="btn btn-main">提交</button></a>
                                                </form>
                                                <p style="color: white">1</p>
                                                <p style="font-size: 22px" th:if="${commentList.size()>0}">当前博客有 <span th:text="${commentList.size()}" style="color: #ff1d5b"></span> 条评论</p>
                                                <div th:each="comment:${commentList}" th:if="${commentList.size()>0}">
                                                    <div class="media">
                                                        <div class="thumb">
                                                            <img th:src="@{'/static/images/userImage/'+${comment.imageName}}" style="width: 66px" alt="img">
                                                        </div>
                                                        <div class="media-body">
                                                            <h6 th:text="'评论人IP地址: '+${comment.ip}+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;评论时间：'+${#dates.format(comment.date,'yyyy-MM-dd HH:mm:ss')}"></h6>
                                                            <p th:text="${comment.content}" style="color: blue"></p>
                                                        </div>
                                                    </div>
                                                    <div class="media nesting" th:if="${comment.reply!=null&&comment.reply!=''}">
                                                        <div class="thumb">
                                                            <img th:src="@{/static/images/userImage/me.png}" style="width: 66px" alt="img">
                                                        </div>
                                                        <div class="media-body">
                                                            <h6>站长回复:</h6>
                                                            <p th:text="${comment.reply}" style="color: #ff1d5b"></p>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- contact area End -->
                    </div>
                </div>
                <div class="col-lg-2">
                    <div class="sidebar-area">
                        <div class="widget widget_tags">
                            <h4 class="widget-title">按类别分类</h4>
                            <ul>
                                <div th:each="blogType:${blogTypeList}">
                                    <a th:href="${'/index?blogTypeId='+blogType.id}"
                                       th:text="${blogType.name+'('+blogType.blogNum+')'}"></a>
                                </div>
                            </ul>

                        </div>
                        <div class="widget widget_tags">
                            <h4 class="widget-title">按时间分类</h4>
                            <ul>
                                <div th:each="blogCount:${blogCountList}">
                                    <a th:href="${'/index?releaseDateStr='+blogCount.releaseDateStr}"
                                       th:text="${blogCount.releaseDateStr+'('+blogCount.blogCount+')'}"></a>
                                </div>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- post-banner end -->
</div>

</body>
</html>